(compile-reinitialize-errors): Don't mark the buffer as modified unless it
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 14 Dec 2002 23:30:36 +0000 (23:30 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 14 Dec 2002 23:30:36 +0000 (23:30 +0000)
really is.

lisp/progmodes/compile.el

index 44f1178c11216ed290326be10e4e060681f32557..f202663a0e45fb854c8f0d3806c480eda205d191 100644 (file)
@@ -1564,6 +1564,7 @@ Does NOT find the source line like \\[next-error]."
            (let ((inhibit-read-only t)
                  (buffer-undo-list t)
                  deactivate-mark
+                  (buffer-was-modified (buffer-modified-p))
                  (error-list compilation-error-list))
              (while error-list
                (save-excursion
@@ -1571,7 +1572,8 @@ Does NOT find the source line like \\[next-error]."
                                       (progn (end-of-line) (point))
                                       '(mouse-face highlight help-echo "\
 mouse-2: visit this file and line")))
-               (setq error-list (cdr error-list))))
+               (setq error-list (cdr error-list)))
+              (set-buffer-modified-p buffer-was-modified))
            )))))
 
 (defun compile-mouse-goto-error (event)